package com.mxpio.erp.common.sales.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.mxpio.erp.common.jpa.model.BizNotice;
import com.mxpioframework.security.annotation.Dict;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_SALES_RB")
@ApiModel(value="退货通知单")
public class RejectBill extends BizNotice {

    private static final long serialVersionUID = 1L;

    @Column(name = "BILL_CREATE_TIME_")
    @ApiModelProperty(value = "单据日期")
    private Date billCreateTime;

    @Column(name = "NOTICE_TYPE_")
    @ApiModelProperty(value = "单据类型")
    @Dict(dicCode="ERP_SALES_REJECT_BILL_TYPE")
    private String noticeType ;

    @Column(name = "SHIPPING_NOTICE_NO_")
    @ApiModelProperty(value = "发货通知单号")
    private String shippingNoticeNo;

    @Column(name = "CST_NAME_")
    @ApiModelProperty(value = "客户名称")
    private String cstName ;

    @Column(name = "RECEIVING_COMPANY_")
    @ApiModelProperty(value = "收货单位")
    private String receivingCompany ;

    @Column(name = "RECEIVING_ADDRESS_")
    @ApiModelProperty(value = "收货地址")
    private String receivingAddress ;

    @Column(name = "RECEIVER_")
    @ApiModelProperty(value = "收货人")
    private String receiver ;

    @Column(name = "RECEIVER_PHONE_")
    @ApiModelProperty(value = "收货人手机")
    private String receiverContacts ;

    @Column(name = "REVIEWER_")
    @ApiModelProperty(value = "审核人")
    private String reviewer ;

    @Column(name = "REVIEW_TIME_")
    @ApiModelProperty(value = "审核时间")
    private Date reviewTime;

    @Column(name = "BILLING_")
    @ApiModelProperty(value = "是否开票")
    @Dict(dicCode = "ERP_COMMON_YESNO")
    private Boolean billing ;

    @Column(name = "MEMO_")
    @ApiModelProperty(value = "备注")
    private String memo;


    @Override
    public String initTypeCode() {
        return "RB1";
    }
}
